
VPATH=obj/:src/
  
CFLAGS	=	-W -Wall -I/usr/include/opencv #`pkg-config --cflags opencv`
LDFLAGS	=	-L/usr/lib -lcxcore -lcv -lhighgui -lcvaux -lml #`pkg-config --libs opencv`

COMM = communication
IA = IA
ACQ = zyeux


cc = g++

scor:	main.o Reseau.o Robot.o Communication.o acquisition.o
	$(cc) obj/main.o $(IA)/obj/Reseau.o $(IA)/obj/Robot.o $(COMM)/obj/Communication.o $(ACQ)/obj/acquisition.o  -o scor $(CFLAGS) $(LDFLAGS)

main.o: main.cpp $(IA)/src/Reseau.h $(IA)/src/Robot.h Outils.h $(COMM)/src/Communication.h $(ACQ)/src/acquisition.h
	$(cc) -c src/main.cpp -o obj/main.o $(CFLAGS) $(LDFLAGS)

Reseau.o: $(IA)/src/Reseau.cpp $(IA)/src/Reseau.h src/Outils.h
	$(cc) -c $(IA)/src/Reseau.cpp -o $(IA)/obj/Reseau.o $(CFLAGS) $(LDFLAGS)

Robot.o: $(IA)/src/Robot.cpp $(IA)/src/Robot.h $(IA)/src/Reseau.h src/Outils.h 
	$(cc) -c $(IA)/src/Robot.cpp -o $(IA)/obj/Robot.o $(CFLAGS) $(LDFLAGS)

Communication.o: $(COMM)/src/Communication.h src/Outils.h
	$(cc) -c $(COMM)/src/Communication.cpp -o $(COMM)/obj/Communication.o $(CFLAGS) $(LDFLAGS)

acquisition.o: $(ACQ)/src/acquisition.h src/Outils.h
	$(cc) -c $(ACQ)/src/acquisition.c -o $(ACQ)/obj/acquisition.o $(CFLAGS) $(LDFLAGS)

clean:
	rm -f IA obj/*.o
